﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Threading;
using System.Threading.Tasks;

namespace Infrastructure.UniOfWorkBase
{
    public interface IUnitOfWork
    {
        bool IsCommitted { get; set; }

        int Commit();
        Task<int> Commit(CancellationToken cancellationToken = default(CancellationToken));

        void Rollback();

        void Reset();

        IList<T> Query<T>(string sql, params object[] args) where T : class, new();
    }
}
